package io.renren.modules.photo.service;

import cn.hutool.http.server.HttpServerResponse;
import io.renren.common.page.PageData;
import io.renren.common.service.BaseService;
import io.renren.common.utils.Result;
import io.renren.modules.photo.dto.PhotoLabelDTO;
import io.renren.modules.photo.entity.PhotoLabelEntity;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.http.ResponseEntity;

/**
 * @Author huan.xu
 * @Date 2022/11/2 11:20
 * @Description 标签信息
 */
public interface PhotoLabelService extends BaseService<PhotoLabelEntity> {


    PageData<PhotoLabelDTO> page(Map<String, Object> params);

    /**
     * 保存标签
     * @param photoLabelDTO
     */
    Result<String> save(PhotoLabelDTO photoLabelDTO);

    /**
     * 删除标签
     * @param ids
     */
    void delete(Long[] ids);

    /**
     * 根据标签名称组装查询框数据
     * @param query
     * @return
     */
    List<Map> getSelectOptions(String query);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    PhotoLabelDTO getById(Long id);

    /**
     * 修改标签
     * @param dto
     */
    Result<String> update(PhotoLabelDTO dto);

    /**
     * 下载标签下的所有照片
     * @param labelId
     * @param response
     * @return
     */
    void downloadLabelPhoto(Long labelId, HttpServletRequest request, HttpServletResponse response);
}
